package com.whmskj.xjlhsc.mapper;

import com.whmskj.xjlhsc.entity.AttendanceStat;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface AttendanceMapper {
    List<AttendanceStat> statByWorkshopAndState();

    List<String> getAllAttendanceStates();

    List<Map<String, Object>> sumYieldByDay(@Param("process") String process,
                                            @Param("begin") String begin,
                                            @Param("end") String end);

    List<Map<String, Object>> sumEnergyByDay(@Param("process") String process,
                                             @Param("begin") String begin,
                                             @Param("end") String end);

//    List<Map<String, Object>> acTrendByWorkshop(@Param("workshop") String workshop,
//                                                @Param("begin") String begin,
//                                                @Param("end") String end);

    List<Map<String, Object>> acTrendByWorkshop(@Param("hour") LocalDate hour, @Param("workshop") String workshop);


//    看板接口以下都是细纱车间看板接口
    /**
     * 获取机台运行状态统计
     */
    List<Map<String, Object>> getMachineStatusCounts(@Param("workshop") String workshop,
                                                     @Param("processes") List<String> processes);

    /**
     * 获取指定月份的机台能耗统计
     */
    List<Map<String, Object>> getMonthlyMachineEnergy(@Param("process") String process,
                                                      @Param("currentDate") String currentDate);
}
